package me.zingon.doc.config;

import me.zingon.doc.interceptor.TokenIntercetor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


/**
 * Created by zhidi on 2018-3-29.
 */
@Configuration
public class SpringMvConfig implements WebMvcConfigurer {


    /**
     * 过滤器配置
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenIntercetor()).excludePathPatterns("*");
    }
}
